﻿using System;
using Ue.CQRS.Snapshots;

namespace Ue.CQRS.Repositories
{
    public interface ISnapshotRepository
    {
        /// <summary>
        /// 返回最新快照
        /// </summary>
        /// <param name="aggregateRootId"></param>
        /// <param name="aggregateRootType"></param>
        void GetLastest(string aggregateRootId, Type aggregateRootType);

        /// <summary>
        /// 添加快照
        /// </summary>
        /// <param name="snapshot"></param>
        void Add(Snapshot snapshot);
    }
}
